package com.test;


import com.fasterxml.jackson.databind.deser.DataFormatReaders;

import java.util.LinkedHashMap;
import java.util.Map;

public class LRUCache extends LinkedHashMap {

    private int size;

    public LRUCache(int x){
        super((int) (x/0.75)+1,0.75f,true);
        size = x;
    }

    @Override
    protected boolean removeEldestEntry(Map.Entry eldest) {
        return size() > size;
    }
}
